package com.weixin.project.Dao;

import com.weixin.project.Entity.PracticeHistory;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Date;
import java.util.List;

public interface PracticeHistoryDao extends JpaRepository<PracticeHistory, Integer> {
    List<PracticeHistory> getPracticeHistoriesByQuestionIdAndUserId(Integer userId, Integer questionId);
    List<PracticeHistory> getPracticeHistoriesByUserIdOrderById(Integer userId);
    List<PracticeHistory> getPracticeHistoriesByCreateTimeAfter(Date date);
    void deletePracticeHistoriesByQuestionId(Integer questionId);
}
